-Subproject commit 43a525fd40faf7dfd261bf3d7469f642a68fad68
+Subproject commit 87bf968f3470657e5a80d3f937b2142f9f6fb53b
GError **async_error;
gboolean caught_error;
- gboolean stdout_is_tty;
guint last_padding;
} OtPullData;
diff--;
}
}
- g_print ("%c8%s", 0x1B, status->str);
+
+ gs_console_begin_status_line (gs_console_get (), status->str, NULL, NULL);
g_string_free (status, TRUE);
run_mainloop_monitor_fetcher (OtPullData *pull_data)
{
GSource *update_timeout = NULL;
+ GSConsole *console;
+
+ console = gs_console_get ();
- if (pull_data->stdout_is_tty)
+ if (console)
{
- g_print ("%c7", 0x1B);
+ gs_console_begin_status_line (console, "", NULL, NULL);
+
update_timeout = g_timeout_source_new_seconds (1);
g_source_set_callback (update_timeout, uri_fetch_update_status, pull_data, NULL);
g_source_attach (update_timeout, g_main_loop_get_context (pull_data->loop));
g_main_loop_run (pull_data->loop);
- if (pull_data->stdout_is_tty)
+ if (console)
{
- g_print ("\n");
+ gs_console_end_status_line (console, NULL, NULL);
g_source_destroy (update_timeout);
}
start_time = g_get_monotonic_time ();
- pull_data->stdout_is_tty = isatty (1);
-
pull_data->remote_name = g_strdup (argv[1]);
pull_data->fetcher = ostree_fetcher_new (ostree_repo_get_tmpdir (pull_data->repo));
config = ostree_repo_get_config (repo);
NULL);
if (!gs_subprocess_simple_run_sync (gs_file_get_path_cached (ostree_dir),
- GS_SUBPROCESS_STREAM_DISPOSITION_NULL,
+ GS_SUBPROCESS_STREAM_DISPOSITION_INHERIT,
cancellable, error,
"ostree", "admin", ostree_dir_arg, "os-init", osname, NULL))
goto out;
goto out;
if (!gs_subprocess_simple_run_sync (gs_file_get_path_cached (ostree_dir),
- GS_SUBPROCESS_STREAM_DISPOSITION_NULL,
+ GS_SUBPROCESS_STREAM_DISPOSITION_INHERIT,
cancellable, error,
"ostree", repoarg, "remote", "add",
osname, repourl, tree_to_deploy, NULL))
}
if (!gs_subprocess_simple_run_sync (gs_file_get_path_cached (ostree_dir),
- GS_SUBPROCESS_STREAM_DISPOSITION_NULL,
+ GS_SUBPROCESS_STREAM_DISPOSITION_INHERIT,
cancellable, error,
"ostree", "pull", repoarg, osname, NULL))
goto out;
if (!gs_subprocess_simple_run_sync (gs_file_get_path_cached (ostree_dir),
- GS_SUBPROCESS_STREAM_DISPOSITION_NULL,
+ GS_SUBPROCESS_STREAM_DISPOSITION_INHERIT,
cancellable, error,
"ostree", "admin", ostree_dir_arg, "deploy", osname,
tree_to_deploy, NULL))
repo_arg = g_strconcat ("--repo=", gs_file_get_path_cached (repo_path), NULL);
if (!gs_subprocess_simple_run_sync (gs_file_get_path_cached (ostree_dir),
- GS_SUBPROCESS_STREAM_DISPOSITION_NULL,
+ GS_SUBPROCESS_STREAM_DISPOSITION_INHERIT,
cancellable, error,
"ostree", repo_arg, "prune", "--refs-only",
"--depth=0", NULL))
NULL);
if (!gs_subprocess_simple_run_sync (gs_file_get_path_cached (ostree_dir),
- GS_SUBPROCESS_STREAM_DISPOSITION_NULL,
+ GS_SUBPROCESS_STREAM_DISPOSITION_INHERIT,
cancellable, error,
"ostree", "pull", repo_arg, osname, NULL))
goto out;
gs_file_get_path_cached (admin_opts->boot_dir),
NULL);
if (!gs_subprocess_simple_run_sync (gs_file_get_path_cached (ostree_dir),
- GS_SUBPROCESS_STREAM_DISPOSITION_NULL,
+ GS_SUBPROCESS_STREAM_DISPOSITION_INHERIT,
cancellable, error,
"ostree", "admin", opt_ostree_dir_arg, opt_boot_dir_arg, "deploy", osname,
deploy_name, NULL))
NULL);
if (!gs_subprocess_simple_run_sync (gs_file_get_path_cached (ostree_dir),
- GS_SUBPROCESS_STREAM_DISPOSITION_NULL,
+ GS_SUBPROCESS_STREAM_DISPOSITION_INHERIT,
cancellable, error,
"ostree", "admin", ostree_dir_arg, "pull-deploy", osname, NULL))
goto out;
if (!gs_subprocess_simple_run_sync (gs_file_get_path_cached (ostree_dir),
- GS_SUBPROCESS_STREAM_DISPOSITION_NULL,
+ GS_SUBPROCESS_STREAM_DISPOSITION_INHERIT,
cancellable, error,
"ostree", "admin", ostree_dir_arg, "prune", osname, NULL))
goto out;